import Vue from 'vue'
import Router from 'vue-router'
import TableQuality from '@/view/table/quality.vue'
import TableSafety from '@/view/table/safety.vue'
import TableMaterials from '@/view/table/materials.vue'
import TableTechnology from '@/view/table/technology.vue'
import TableLabourServer from '@/view/table/LabourServer.vue'
import TableSchedule from '@/view/table/schedule.vue'
import TableCoordinate from '@/view/table/coordinate.vue'
import TableEquipment from '@/view/table/equipment.vue'


import TableMap from '@/view/map/index.vue'
import LocationMap from '@/view/map/location_map.vue';

import PersonCenter from '@/view/person_center/index.vue'
import PersonCenterEdit from '@/view/person_center/edit.vue'
import PersonCenterHonour from '@/view/person_center/honour.vue'
import PersonCenterKnowledge from '@/view/person_center/knowledge.vue'
import PersonCenterPassword from '@/view/person_center/password.vue'
import PersonCenterRecord from '@/view/person_center/record.vue'
import PersonCenterAppraise from '@/view/person_center/appraise.vue'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    redirect: '/table/quality'
  }, {
    path: '/table/quality',
    component: TableQuality
  }, {
    path: '/table/safety',
    component: TableSafety
  }, {
    path: '/table/materials',
    component: TableMaterials
  }, {
    path: '/table/technology',
    component: TableTechnology
  }, {
    path: '/table/labourserver',
    component: TableLabourServer
  }, {
    path: '/table/schedule',
    component: TableSchedule
  }, {
    path: '/table/coordinate',
    component: TableCoordinate
  }, {
      path: '/table/equipment',
      component: TableEquipment
  }, {
    path: '/map',
    component: TableMap
  }, {
      path: '/location/map',
      component: LocationMap
  },{
    path: '/person-center',
    component: PersonCenter,
    children: [{
      path: 'edit',
      component: PersonCenterEdit
    }, {
      path: 'honour',
      component: PersonCenterHonour
    }, {
      path: 'knowledge',
      component: PersonCenterKnowledge
    }, {
      path: 'password',
      component: PersonCenterPassword
    }]
  }, {
    path: '/person-center/record',
    component: PersonCenterRecord
  }, {
    path: '/person-center/appraise',
    component: PersonCenterAppraise
  }]
})
